# OpenJazz makefile

objects = src/bonus/bonus.o \
	src/game/clientgame.o src/game/game.o src/game/gamemode.o \
	src/game/localgame.o src/game/servergame.o \
	src/io/gfx/anim.o src/io/gfx/font.o src/io/gfx/paletteeffects.o \
	src/io/gfx/sprite.o src/io/gfx/video.o \
	src/io/gfx/scale2x/getopt.o src/io/gfx/scale2x/pixel.o \
	src/io/gfx/scale2x/scale2x.o src/io/gfx/scale2x/scale3x.o \
	src/io/gfx/scale2x/scalebit.o src/io/gfx/scale2x/simple2x.o \
	src/io/controls.o src/io/file.o src/io/network.o src/io/sound.o \
	src/jj2level/jj2event/jj2event.o src/jj2level/jj2event/jj2eventframe.o \
	src/jj2level/jj2layer.o src/jj2level/jj2level.o \
	src/jj2level/jj2levelframe.o src/jj2level/jj2levelload.o \
	src/level/event/bridge.o src/level/event/guardians.o \
	src/level/event/event.o src/level/event/eventframe.o \
	src/level/bullet.o src/level/demolevel.o src/level/level.o \
	src/level/levelframe.o src/level/levelload.o src/level/movable.o \
	src/menu/gamemenu.o src/menu/mainmenu.o src/menu/menu.o \
	src/menu/plasma.o src/menu/setupmenu.o \
	src/planet/planet.o \
	src/player/bird.o src/player/bonusplayer.o src/player/jj2levelplayer.o \
	src/player/jj2levelplayerframe.o src/player/levelplayer.o \
	src/player/levelplayerframe.o src/player/player.o \
	src/scene/scene.o src/scene/sceneload.o \
	src/baselevel.o src/main.o src/util.o

all: OpenJazz

OpenJazz: $(objects)
	$(CXX) -Wall -o OpenJazz $(LDFLAGS) $(objects) -lSDL -lstdc++ -lz $(LIB) -o $@

%.o: %.cpp
	$(CXX) -Wall $(CXXFLAGS) -Isrc -c $< -o $@

clean:
	rm -f OpenJazz $(objects)
